import api from '@/services/organization/group-base-management';

export type Department = GroupBaseManagementApi.InfoResponse;

export const getAllList = async () => {
  const res = await api.getAllList<Department[]>();
  return res.data;
};
export const create = async (params: GroupBaseManagementApi.CreateParams) => {
  const data = await api.create(params);
  return data;
};
export const update = async (params: GroupBaseManagementApi.UpdateParams) => {
  const data = await api.update(params);
  return data;
};
export const remove = async (params: GroupBaseManagementApi.DeleteParams) => {
  const data = await api.remove(params);
  return data;
};
export default {
  getAllList,
  create,
  update,
  remove,
};
